PLUGINS |
A Rainmeter plugin is a DLL that exports these functions (it's not necessary to export all of them): UINT Initialize(HMODULE instance, LPCTSTR iniFile,
LPCTSTR section, UINT id); The Initialize function is called when the measure is initialized. The function returns the maximum value that can be measured. If the maximum value is unknown the function should return 0. The plugin can also have it's own settings which can be loaded from the iniFile and the section given as parameters to the initialize function. the id-parameter is used to identify individual measures if there are several of them using the same plugin. The Finalize is called when the measure is deleted. The Update is called once per update period (usually once per second). The function returns the measured value. The Update2 is an alternative version of the function which can be used if the measure returns negative values. The GetString is called when the meter needs the value as string. If this function is not implemented the value returned by the Update is converted to a string automatically. Check the Rainmeter sources for example how to implement a plugin. |